<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html debug=true>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Window base on Jquery</title>
		<script src="jquery-1.3.2.js" type="text/javascript"></script>
		<script src="jquery.myext.js" type="text/javascript"></script>
		<script src="window_src.js" type="text/javascript"></script>
		<link href="office.css" rel="stylesheet" type="text/css" />
	</head>
	<body style="height:400px;width:2000px">
		<script type="text/javascript">
		function show(){
			var content = '<div style="width:100%;height:100%;"><form style="background-color:#FFF;color:#000;">window title:<input name="wtitle" type="text" /><br />\
			window type:<select name="wtype"><option value="1">ajax page</option><option value="2">iframe</option></select><button onclick="openn(this.form)" type="button">Open</button></form></div>';
			var d = new Dialog({
				draggable: true,
				autosize:true,
				resizable:true,
				maximizable:true,
				autopos:'fixed'
			}).html(content).show();
		}
		function openn(frm) {
			switch (frm.wtype.value) {
			case '1':Dialogs.load('ajax.html',{
				draggable: true,
				autosize:true,
				resizable:true,
				maximizable:true,
				autopos:'fixed',
				title:frm.wtitle.value,
				width:200
			});break;
			case '2':new Dialog({
					draggable: true,
					resizable:true,
					maximizable:true,
					autopos:'fixed',
					title:frm.wtitle.value
				}).href('http://www.google.com').show().setSize(650,400).center();break;
			}
		}
		</script>
		<a href="javascript:show()">open a window</a>
	</body>
</html>
